openblas: backport version of fix from upstream
authorAlexandru Ardelean <[email protected]>
Mon, 22 Sep 2025 06:42:46 +0000 (09:42 +0300)
committerAlexandru Ardelean <[email protected]>
Tue, 23 Sep 2025 09:03:36 +0000 (12:03 +0300)
From this PR:
  https://github.com/OpenMathLib/OpenBLAS/pull/5442

Signed-off-by: Alexandru Ardelean <[email protected]>
libs/openblas/Makefile
libs/openblas/patches/0001-Make-GEMM3M-parameters-available-on-32bit-X86-GENERI.patch [new file with mode: 0644]
libs/openblas/patches/0001-fix-x86-defaults.patch [deleted file]

index 29459a336c576dc1c4599781344e14d4b048cd4c..8f1eb09eefbf47987f98fcb077c6ffbe9aac5a25 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=OpenBLAS
 PKG_VERSION:=0.3.30
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=OpenBLAS-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/OpenMathLib/OpenBLAS/releases/download/v$(PKG_VERSION)/
diff --git a/libs/openblas/patches/0001-Make-GEMM3M-parameters-available-on-32bit-X86-GENERI.patch b/libs/openblas/patches/0001-Make-GEMM3M-parameters-available-on-32bit-X86-GENERI.patch
new file mode 100644 (file)
index 0000000..70799b1
--- /dev/null
@@ -0,0 +1,41 @@
+From cb6c4392a562e9b04299949bcfbd1fd9e5872c68 Mon Sep 17 00:00:00 2001
+From: Martin Kroeker <[email protected]>
+Date: Wed, 10 Sep 2025 22:44:14 +0200
+Subject: [PATCH] Make GEMM3M parameters available on 32bit X86-GENERIC
+
+---
+ param.h | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/param.h
++++ b/param.h
+@@ -4046,8 +4046,6 @@ Until then, just keep it different than
+ #define CGEMM_DEFAULT_UNROLL_N 2
+ #define ZGEMM_DEFAULT_UNROLL_N 2
+ #define XGEMM_DEFAULT_UNROLL_N 1
+-#define CGEMM3M_DEFAULT_UNROLL_N 2
+-#define ZGEMM3M_DEFAULT_UNROLL_N 2
+ #ifdef ARCH_X86
+ #define SGEMM_DEFAULT_UNROLL_M 2
+@@ -4063,8 +4061,11 @@ Until then, just keep it different than
+ #define CGEMM_DEFAULT_UNROLL_M 2
+ #define ZGEMM_DEFAULT_UNROLL_M 2
+ #define XGEMM_DEFAULT_UNROLL_M 1
++#endif
+ #define CGEMM3M_DEFAULT_UNROLL_M 2
+ #define ZGEMM3M_DEFAULT_UNROLL_M 2
++#define CGEMM3M_DEFAULT_UNROLL_N 2
++#define ZGEMM3M_DEFAULT_UNROLL_N 2
+ #define CGEMM3M_DEFAULT_P 448
+ #define ZGEMM3M_DEFAULT_P 224
+ #define XGEMM3M_DEFAULT_P 112
+@@ -4075,7 +4076,7 @@ Until then, just keep it different than
+ #define ZGEMM3M_DEFAULT_R 12288
+ #define XGEMM3M_DEFAULT_R 12288
+-#endif
++
+ #ifdef ARCH_MIPS
+ #define SGEMM_DEFAULT_P  128
diff --git a/libs/openblas/patches/0001-fix-x86-defaults.patch b/libs/openblas/patches/0001-fix-x86-defaults.patch
deleted file mode 100644 (file)
index 2d85075..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
---- a/param.h
-+++ b/param.h
-@@ -4179,5 +4179,38 @@ Until then, just keep it different than
- #define SHUFPS_39     shufps  $0x39,
- #endif
-+#if defined(ARCH_X86)
-+#ifndef CGEMM3M_DEFAULT_R
-+#define CGEMM3M_DEFAULT_R 12288
-+#endif
-+
-+#ifndef CGEMM3M_DEFAULT_UNROLL_M
-+#define CGEMM3M_DEFAULT_UNROLL_M 8
-+#endif
-+
-+#ifndef CGEMM3M_DEFAULT_P
-+#define CGEMM3M_DEFAULT_P 320
-+#endif
-+
-+#ifndef CGEMM3M_DEFAULT_Q
-+#define CGEMM3M_DEFAULT_Q 224
-+#endif
-+
-+#ifndef ZGEMM3M_DEFAULT_R
-+#define ZGEMM3M_DEFAULT_R 12288
-+#endif
-+
-+#ifndef ZGEMM3M_DEFAULT_Q
-+#define ZGEMM3M_DEFAULT_Q 224
-+#endif
-+
-+#ifndef ZGEMM3M_DEFAULT_P
-+#define ZGEMM3M_DEFAULT_P 224
-+#endif
-+
-+#ifndef ZGEMM3M_DEFAULT_UNROLL_M
-+#define ZGEMM3M_DEFAULT_UNROLL_M 4
-+#endif
-+#endif
- #endif